--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--[[

    乾坤帽子 系统

]]--
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

return function(inst)
    if not TheWorld.ismastersim then
        return
    end

    inst:AddComponent("hutao_com_cosmic_hat_sys_for_player")

    inst:ListenForEvent("hutao_com_cosmic_hat_sys_for_player.hat_not_found", function(inst)
        local item = SpawnPrefab("hutao_equipment_cosmic_hat_sky")
        inst.components.hutao_com_cosmic_hat_sys_for_player:SetHat(item)
        inst.components.inventory:GiveItem(item)
    end)
    inst:ListenForEvent("hutao_com_cosmic_hat_sys_for_player.call_hat_failed", function(inst)
        local item = SpawnPrefab("hutao_equipment_cosmic_hat_sky")
        inst.components.hutao_com_cosmic_hat_sys_for_player:SetHat(item)
        inst.components.inventory:GiveItem(item)
    end)

    inst:ListenForEvent("hutao_com_cosmic_hat_sys_for_player.call_hat_failed_because_drying_rack",function()
        inst.components.talker:Say("我应该挂在某个架子上了，得找一找")
    end)

end